<!-- $Id: backup.html 11 2011-02-06 11:08:21Z nicholasinlove1986@gmail.com $ -->
<include file="Public:pageheader"/>
<load href="__PUBLIC__/Js/validator.js" />
<script language="javascript">
/**
 * 检查表单输入的数据
 */
function validate()
{
  validator = new Validator("theForm");
  validator.required("file_name", "{$Think.lang.js_file_name}");
  validator.required("vol_size", "{$Think.lang.js_vol_size}");
  return validator.passed();
}

function findobj(str)
{
    return document.getElementById(str);
}

function checkall(frm, chk)
{
    for (i = 0; i < frm.elements.length; i++)
    {
        if (frm.elements[i].name == chk)
        {
            frm.elements[i].checked = frm.elements['chkall'].checked;
        }
    }
}

</script>
<present name='warning'>
<ul style="padding:0; margin: 0; list-style-type:none; color: #CC0000;">
  <li style="border: 1px solid #CC0000; background: #FFFFCC; padding: 10px; margin-bottom: 5px;" >{$warning}</li>
</ul>
</present>
<form  name="theForm" method="post"  action="__URL__/dumpSql"  onsubmit="return validate()">
<div class="list-div" id="listDiv">
<table cellspacing='1' cellpadding='3' >
  <tr>
    <th colspan="2">{$Think.lang.backup_type}</th>
  </tr>
  <tr>
    <td width="50%"><input type="radio" name="type" value="full" class="radio" checked="checked"  onclick="findobj('showtables').style.display='none'">{$Think.lang.full_backup}</td>
    <td width="163">{$Think.lang.full_backup_note}</td>
  </tr>
  <tr>
    <td><input type="radio" name="type" value="stand" class="radio"  disabled="disabled">{$Think.lang.stand_backup}</td>
    <td>{$Think.lang.stand_backup_note}</td>
  </tr>
  <tr>
    <td><input type="radio" name="type" value="min" class="radio" disabled="disabled">{$Think.lang.min_backup}</td>
    <td>{$Think.lang.min_backup_note}</td>
  </tr>
  <tr>
    <td><input type="radio" name="type" value="custom" class="radio" onclick="findobj('showtables').style.display=''">{$Think.lang.custom_backup}</td>
    <td>{$Think.lang.custom_backup_note}</td>
  </tr>
 <tbody id="showtables" style="display:none">
  <tr>
    <td colspan="2">
      <table>
        <tr>
          <td colspan="4"><input name="chkall" onclick="checkall(this.form, 'customtables[]')" type="checkbox"><b>{$Think.lang.select_all}</b></td>
        </tr>
        <tr>
		 <volist name="table" id="vo" mod="4">
		 <eq name="mod" value="1"></tr><tr></eq>
          <td><input name="customtables[]" value="{$vo}"  type="checkbox">{$vo}</td>
        </volist>
        </tr>
      </table>
    </td>
  </tr>
  </tbody>
  </table>
<table cellspacing='1' cellpadding='3' >
  <tr>
    <th colspan="2">{$Think.lang.option}</th>
  </tr>
  <tr>
    <td>{$Think.lang.vol_size}</td>
    <td><input type="text" name="vol_size" value="{$vol_size}"></td>
  </tr>
  <tr>
    <td width="50%">{$Think.lang.sql_name}</td>
    <td><input type="text" name="file_name" value="{$file_name}"></td>
  </tr>
</table>
<input type="hidden" name="dumpsql" value="do">
<div class="button-div"><input type="submit" value="{$Think.lang.start_backup}" class="button" /></div>
</div>
</form>
<include file="Public:pagefooter"/> 